package com.ruibang.glass.produce.feign;

import com.teaming.cloud.framework2.common.model.ResultBody;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

@FeignClient("glass-quality")
@Component
public interface QualityApi {
    @PostMapping("/api/quality/manage/glassStation/getColdGlassId")
    @ApiOperation(value = "根据热端玻璃ID获取冷端玻璃ID", notes = "根据热端玻璃ID获取冷端玻璃ID")
    ResultBody<List<String>> getColdGlassId(@RequestBody List<String> hotIds);

    @GetMapping("/api/quality/manage/glassStation/getHotId/{coldGlassId}")
    @ApiOperation(value = "根据冷端玻璃ID获取热端玻璃ID", notes = "根据冷端玻璃ID获取热端玻璃ID")
    ResultBody<String> getHotId(@PathVariable("coldGlassId") String coldGlassId);

    @PostMapping("/api/quality/manage/glassStation/getColdIdMappingHotId")
    @ApiOperation(value = "根据冷端玻璃ID获取热端玻璃ID映射关系", notes = "根据冷端玻璃ID获取热端玻璃ID映射关系")
    ResultBody<Map<String, String>> getColdIdMappingHotId(@RequestBody List<String> coldIds);
}
